function login() {
    let username =document.getElementById('loginUsername').value
    let password =document.getElementById('loginPassword').value
    let storedPassword =localStorage.getItem(username)
    if(!username || !password) {
        alert('用户名和密码不能为空！');
        return
    }
    if(storedPassword === password) {
        alert('登录成功');
    } else {
        alert('登录失败，请检查您的账号和密码。');
    }
}